:root {
    --primary-color: #18a058;
    --menu-bg: #f6f6f6;
    --header-height: 64px;
    --sidebar-width: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
}

.admin-layout {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar main";
    grid-template-rows: var(--header-height) 1fr;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* 顶部导航栏 */
.admin-header {
    grid-area: header;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 100;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logout-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
}

/* 左侧菜单 */
.admin-sidebar {
    grid-area: sidebar;
    background-color: var(--menu-bg);
    padding: 16px 0;
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    overflow-y: auto;
}

.menu-list {
    list-style: none;
}

.menu-item {
    margin: 4px 8px;
}

.menu-item > a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s;
}

.menu-item > a:hover {
    background-color: rgba(24, 160, 88, 0.1);
}

.menu-icon {
    margin-right: 8px;
    font-size: 18px;
}

.menu-title {
    flex: 1;
}

.menu-arrow {
    width: 16px;
    height: 16px;
    position: relative;
}

.menu-arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: translate(-75%, -50%) rotate(45deg);
    transition: transform 0.3s;
}

.menu-item.active > a .menu-arrow::after {
    transform: translate(-75%, -50%) rotate(-135deg);
}

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    padding-left: 48px;
}

.menu-item.active .submenu {
    max-height: 200px;
}

.submenu li a {
    display: block;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.submenu li a:hover {
    color: var(--primary-color);
}

/* 主内容区域 */
.admin-main {
    grid-area: main;
    padding: 25px;
    background-color: #fff;
    overflow-y: auto;
}